package cn.yuemouren.security.app.social.impl;

import cn.yuemouren.security.core.social.support.SocialAuthenticationFilterPostProcessor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.web.authentication.AuthenticationSuccessHandler;
import org.springframework.social.security.SocialAuthenticationFilter;
import org.springframework.stereotype.Component;

/**
 * @Author: Timi
 * @Description: 替换成功处理器
 * @Date: 2020/7/4 18:33
 * @Version: v1.0
 */
@Component
public class AppSocialAuthenticationFilterPostProcessor implements SocialAuthenticationFilterPostProcessor {

    @Autowired
    private AuthenticationSuccessHandler timiAuthenticationSuccessHandler;

    @Override
    public void processor(SocialAuthenticationFilter socialAuthenticationFilter) {
        socialAuthenticationFilter.setAuthenticationSuccessHandler(timiAuthenticationSuccessHandler);
    }
}
